//
//  JAGAdNative.h
//  JAGatherAdSDK
//
//  Created by Yc on 2022/12/8.
//

#import <JAGatherAdSDK/JAGatherAdSDK.h>
#import "JAGHeader.h"

NS_ASSUME_NONNULL_BEGIN

@class JAGAdNative,JAGNativeFeedAdModel;

@protocol JAGAdNativeDelegate <NSObject>

@optional

/// 信息流广告加载成功
- (void)JAGatherNativedAdLoadSuccess:(JAGAdNative *)nativeAd feedAds:(NSArray <JAGNativeFeedAdModel *> *)feedAds;

/// 信息流广告加载失败
- (void)JAGatherNativeAdFailToLoad:(JAGAdNative *)nativeAd error:(NSError *)error;

/// 信息流广告渲染成功
- (void)JAGatherNativeAdRenderSuccess:(JAGAdNative *)nativeAd feedAd:(JAGNativeFeedAdModel *)feedAd;

/// 信息流广告渲染失败
- (void)JAGatherNativeAdRenderFail:(JAGAdNative *)nativeAd feedAd:(JAGNativeFeedAdModel *)feedAd error:(NSError *)error;

/// 信息流广告曝光
- (void)JAGatherNativeAdDidExpourse:(JAGAdNative *)nativeAd feedAd:(JAGNativeFeedAdModel *)feedAd;

/// 信息流广告点击
- (void)JAGatherNativeAdClicked:(JAGAdNative *)nativeAd feedAd:(JAGNativeFeedAdModel *)feedAd;

/// 信息流广告关闭
- (void)JAGatherNativeAdClosed:(JAGAdNative *)nativeAd feedAd:(JAGNativeFeedAdModel *)feedAd;

/// 信息流广告关闭落地页
- (void)JAGatherNativeAdDidCloseLandingPage:(JAGAdNative *)nativeAd feedAd:(JAGNativeFeedAdModel *)feedAd;

/// 信息流视频广告播放状态，可能不会回调
- (void)JAGatherNativeAdVideoDidChanged:(JAGAdNative *)nativeAd playState:(JAGVideoPlayState)playState feedAd:(JAGNativeFeedAdModel *)feedAd;

@end

@interface JAGAdNative : JAGAdBaseAdapter

@property (nonatomic, weak) id<JAGAdNativeDelegate> delegate;

/// 广告展示的宽高 (宽度必须传入，若传0则按屏幕宽度适配，实际高度会根据宽度适配，可通过回调的模版获取)
/// 注：展示快手Draw样式需传入高度，且高度不能大于展示父容器的高度。若传0 则按传入宽度 16:9 适配。
@property (nonatomic, assign) CGSize adSize;

/// 请求广告数量，默认请求1个，可设置区间[1，3]， (注：百青藤无效)
@property (nonatomic, assign) NSInteger count;

/// 初始化信息流广告
/// @param placementID 广告位
/// @param size 广告尺寸
- (instancetype)initWithPlacementID:(NSString*)placementID
                             adSize:(CGSize)size;

@end



NS_ASSUME_NONNULL_END
